<div ng-init="init();" class="kmi-layout-content SMT15-content">
    <!-- SMT 產品送修 -->
    <div class="kmi-header-row">
        <div class="kmi-side-btn left" ng-click="back();">
            <i class="material-icons">&#xE408;</i>
            <div class="kmi-can-click"></div>
        </div>
        <div class="header-title" ng-bind="'SMT15.title' | translate"></div>
        <div class="header-logo"></div>
    </div>
    <div class="kmi-layout-main-content">
        <div class="kmi-layout-page">
            <!-- 產品序號 product_serialNumber_panel -->
            <div class="product_serialNumber_panel">
                <div class="kmi-text-fields serialNumber_panel">
                        <label class="label" ng-bind="'SMT15.serial_no' | translate"></label>
                        <input ng-keypress="input_barcode_no($event);" ng-model="barcode_no" id="barcode_no"/>
                        <div class="tip qrcode" ng-click="QRCodeScanner();">
                            <img src="image/icons/QRCode.png">
                        </div>
                        <div class="kmi-button kmi-button-confrim" style="width:100px" ng-click="search();">
                            <label ng-bind="'common.btn.search' | translate"></label>
                            <div class="kmi-can-click"></div>
                        </div>
                        <label class="label" ng-bind="'home.user' | translate"></label>
                        <input class="value" ng-model="data.dispose_user"></input>
                        <div class="tip search"><img src="image/icons/search.png"></img> </div>
                </div>
            </div>
            <!-- 產品基本資料 product_basicData_panel  -->
                <div class="basicData_panel" ng-class="[isClose?'is-close':'']">
                    <div class="trigger-btn-fields">
                        <div class="close-btn" ng-click="isClose = !isClose">
                            <i class="material-icons closeIcon">remove</i>
                            <i class="material-icons openIcon">add</i>
                            <div class="kmi-can-click" style="z-index: 1;"></div>
                        </div>
                    </div>
                    <div class="basicData">
                        <div class="kmi-text-fields">
                            <!-- 维修序号： -->
                            <label class="label fixed-width" ng-bind="'SMT15.list1.barcode' | translate"></label>
                            <label class="value" ng-bind="data.barcode" ng-hide = "hasRecall"></label>
                            <label class="value" ng-bind="data.panel_no" ng-show = "hasRecall"></label>
                        </div>
                        <div class="kmi-text-fields">
                            <!-- 生產批號： -->
                            <label class="label fixed-width" ng-bind="'SMT15.list1.plot_no' | translate"></label>
                            <label class="value" ng-bind="data.plot_no"></label>
                        </div>
                        <div class="kmi-text-fields">
                            <!-- 工序： -->
                            <label class="label fixed-width" ng-bind="'SMT15.list1.smt_op_seq' | translate"></label>
                            <input ng-model="data.smt_op_seq" readonly="readonly" ng-click="loadSMTOPSeq();"></input>
                            <div class="tip"><i class="material-icons">&#xE5CF;</i></div>
                        </div>
                    </div>
                    <div class="basicData">
                        <div class="kmi-text-fields">
                            <!-- 序号类型： -->
                            <label class="label fixed-width" ng-bind="'SMT15.list1.mode' | translate"></label>
                            <label class="value" ng-bind="'SMT15.list1.product_serial_no' | translate" ng-show="data.mode=='1'"></label>
                            <label class="value" ng-bind="'SMT15.list1.Panel_serial_no' | translate" ng-show="data.mode=='0'"></label>
                        </div>
                        <div class="kmi-text-fields">
                            <!-- 品號： -->
                            <label class="label fixed-width" ng-bind="'SMT15.list1.product_no' | translate"></label>
                            <label class="value" ng-bind="data.product_no"></label>
                        </div>
                        <div class="kmi-text-fields">
                            <!-- 設備(機台)編號： -->
                            <label class="label fixed-width" ng-bind="'SMT15.list1.machine_no' | translate"></label>
                            <label class="value" ng-bind="data.machine_no"></label>
                        </div>
                    </div>
                    <div class="basicData">
                        <div class="kmi-text-fields">
                            <!-- 數量： -->
                            <label class="label fixed-width" ng-bind="'SMT15.list1.qty' | translate"></label>
                            <label class="value" ng-bind="data.qty"></label>
                        </div>
                        <div class="kmi-text-fields">
                            <!-- 規格： -->
                            <label class="label fixed-width" ng-bind="'SMT15.list1.product_spec' | translate"></label>
                            <label class="value" ng-bind="data.item_spec"></label>
                        </div>
                        <div class="kmi-text-fields" ng-show='data.pcs_no'>
                            <!-- 產品序號： -->
                            <label class="label fixed-width" ng-bind="'SMT15.list1.product_no_on_panel' | translate"></label>
                            <label class="value" ng-bind="data.pcs_no"></label>
                        </div>
                    </div>
                </div>
            <!-- 產品送修的不良原因 product_repairReason_panel-->
            <div class="product_repairReason_panel">
                <div class="kmi-text-fields repairReason_fields" >
                    <div class="repairReason_model">
                        <!-- 不良原因 -->
                        <label class="label" ng-bind="'SMT15.defect_reason' | translate"></label>
                    </div>
                </div>
                <div class="kmi-list column-selector" column-selector-id="" style="border-radius: 0 0 6px 6px;">
                    <div class="kmi-list__header">
                        <div class="kmi-list__column" style="flex: 0 0 40px"></div>
                        <!-- 不良原因編號 -->
                        <div class="kmi-list__column" style="flex: 1;" ng-bind="'SMT15.list2.defect_reason_no' | translate"></div>
                        <!-- 不良原因名稱 -->
                        <div class="kmi-list__column" style="flex: 1;" ng-bind="'SMT15.list2.defect_reason_name' | translate"></div>
                        <!-- 缺點數 -->
                        <div class="kmi-list__column" style="flex: 0 0 64px;" ng-bind="'SMT15.list2.defect_qty' | translate"></div>
                        <!-- 連板位置 -->
                        <div class="kmi-list__column" style="flex: 1;" ng-bind="'SMT15.list2.panelization_position' | translate"></div>
                        <!-- 不良位置(說明) -->
                        <div class="kmi-list__column" style="flex: 1;" ng-bind="'SMT15.list2.defect_position' | translate"></div>
                    </div>
                    <div class="kmi-list__row-content">
                        <div class="kmi-list__row" ng-repeat="item in item_list">
                            <div class="kmi-list__column column-border" style="flex: 0 0 40px;">
                                <button class="mdl-button mdl-button--icon" ng-click="removeRow(item);">
                                    <img src="image/icons/delete.png"></img>
                                </button>
                            </div>
                            <!-- 不良原因編號 -->
                            <div class="kmi-list__column column-border" style="flex: 1;" ng-bind="item.reason_no">}</div>
                            <!-- 不良原因名稱 -->
                            <div class="kmi-list__column column-border" style="flex: 1;" ng-bind="item.reason_name"></div>
                            <!-- 缺點數 -->
                            <div class="kmi-list__column column-input column-border" style="flex: 0 0 64px;">
                                <input mdl-calculater="item.defect_qty" mdl-calculater-decimal="true" readonly="readonly"/>
                            </div>
                            <!-- 連板位置-->
                            <div class="kmi-list__column column-input column-border" style="flex: 1;">
                                <input class="value" ng-model="item.panellization_location"></input>
                            </div>
                            <!-- 不良位置(說明)-->
                            <div class="kmi-list__column column-input column-border" style="flex: 1;">
                                <input class="value" ng-model="item.memo"></input>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 加號按鈕 (開窗) -->
            <div class="btn_panel">
                <button class="mdl-button mdl-js-button mdl-button--icon mdl-button--icon_prime" ng-click="AddReason();">
                    <img src="image/icons/add.png"></img>
                </button>
            </div>
        </div>
        <div class="kmi-layout-footer">
            <button class="mdl-button mdl-js-button mdl-button--fab mdl-shadow--custom mdl-button--custom1" ng-click="confirm();">
              <i class="material-icons">done</i>
            </button>
        </div>
    </div>
</div>
